﻿
--新建地域补助
CREATE proc [dbo].[proc_Employee_Allowance_Create]
(
	@CompanyList nvarchar(500),
	@Amount numeric(18,2),
	@Memo text,
	@PostId int,
	@EAId uniqueidentifier,
	@Pid int,
	@Cid int
)
as
	begin
	insert into Employee_Allowance(EAId,Amount,Memo,PostId,Pid,Cid) values(@EAId,@Amount,@Memo,@PostId,@Pid,@Cid)
	
	/*Declare @i int
		Set @i=0
		while(@i<len(@CompanyList))
			Begin
				Insert Into Employee_Allowance_Company(CompanyId,EAId) Values(substring(@CompanyList,@i,charindex(',',@CompanyList,@i)-@i),@EAId)
				Set @i=charindex(',',@CompanyList,@i)+1
			End
	*/
	end
